<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="${package}.mapper.${moduleName}.${className}Mapper">

	<!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="${package}.entity.${moduleName}.${className}Entity" id="BaseResultMap">
        <#list columns as column>
            <#if column.columnName == pk.columnName >
                <id property="${column.attrname}" column="${(column.columnName)?upper_case}" jdbcType="${column.jdbcType}"/>
            <#else>
                <result property="${column.attrname}" column="${(column.columnName)?upper_case}" jdbcType="${column.jdbcType}"/>
            </#if>
        </#list>
    </resultMap>

    <sql id="Base_Column_List" >
        <#list columns as column><#if column_index !=0 >,</#if>t.${(column.columnName)?upper_case}</#list>
    </sql>

</mapper>